package com.linwen.javase.desgin_pattern.action.iterator;

import java.util.ArrayList;

/**
 * @ClassName IteratorTest
 * @Description
 * @Author lin
 * @Date 2022/6/28 下午11:51
 * @Version V1.0
 */
public class IteratorTest {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add("aaa");
        myArrayList.add("bbb");
        myArrayList.add("ccc");
        MyIterator iterator = myArrayList.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
